<style>
    .ncap-form-default {
        padding: 10px 0;
        overflow: hidden;
    }
    .ncap-form-default dl.row, .ncap-form-all dd.opt {
        font-size: 0;
        color: #777;
        background-color: #FFF;
        padding: 12px 0;
        margin-top: -1px;
        border-style: solid;
        border-width: 1px 0;
        border-color: #F0F0F0;
        position: relative;
        z-index: 1;
    }
    .ncap-form-default dt.tit, .ncap-form-default dd.opt {
        font-size: 12px;
        line-height: 24px;
        vertical-align: top;
        letter-spacing: normal;
        display: inline-block;
    }
    .ncap-form-default dt.tit {
        text-align: right;
        width: 14%;
        padding-right: 2%;
    }
    .ncap-form-default dt.tit em {
        font: bold 14px/20px tahoma, verdana;
        color: #F60;
        vertical-align: middle;
        display: inline-block;
        margin-right: 5px;
    }
    .ncap-form-default dd.opt {
        text-align: left;
        width: 83%;
        color: #000;
    }
    .ncap-form-default .input-txt, .ncap-form-all .input-txt {
        display: inline-block;
        padding: 14px 4px;
        width: 280px !important;
        height: 20px;
        line-height: 20px;
        border: solid 1px #D7D7D7;
        background-color: #FFF;
        color: #333;
        font-size: 12px;
        white-space: nowrap;
        -moz-border-radius: 4px;
        -webkit-border-radius: 4px;
        border-radius: 4px;
        overflow: hidden;
        cursor: text;
        resize: none;
    }
    .ncap-form-default .input-txt:hover{
        color: #33464F;
        background-color: #fff;
        border: 1px solid  #2CBCA3;
        -moz-box-shadow: 0 0 0 2px rgba(82, 168, 236, 0.15);
        -webkit-box-shadow: 0 0 0 0 2px rgba(82, 168, 236, 0.15);
        box-shadow: 0 0 0 2px rgba(82, 168, 236, 0.15);
        outline: 0 none;
    }
    .ncap-form-default p.notic, .ncap-form-all p.notic {
        line-height: 18px;
        color: #AAA;
        margin-top: 4px;
        clear: both;
    }
    .ncap-form-default dl.row:hover p.notic {
        color: #2cbca3;
    }
    .ncap-form-default div.bot, .ncap-form-all div.bot {
        display: block;
        padding: 12px 0 10px 16%;
    }
    a.ncap-btn-green {
        display: inline-block;
        padding: 7px 19px;
        height: 20px;
        border: solid 1px #3aa8cf;
        background-color: #4fc0e8;
        border-radius: 3px;
        color: #fff;
        text-align: center;
        vertical-align: middle;
        cursor: pointer;
    }
</style>
<include file="Common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('brand/index')}">品牌管理</a>
</div>
<div class="permissions-content">
    <div class="permissions-le">
        <div class="message-set">
            <span class="hints">操作提示</span>
            <span class="hints-dec">自行定义代理层级名称以及级数</span>
        </div>
        <form action="{:U('Agent/add_rank')}" method="post" class="form-horizontal" id="rank_form">
            <div class="ncap-form-default">
                <dl class="row">
                    <dt class="tit">
                        <label><em>*</em>层级名称</label>
                    </dt>
                    <dd class="opt">
                        <foreach name="ranks" item="rank">
                            {$rank['rank_name']}
                            <p style="width:2%;text-align: center;">↓</p>
                        </foreach>
                        <input type="text" placeholder="名称" class="input-txt" name="rank_name" value="" id="rank_name">
                        <span class="err" id="s_name" style="color:#F00; display:none;"></span>
                        <p class="notic"></p>
                    </dd>
                </dl>
                <input type="hidden" name="rank_id" value="106">
                <input type="hidden" name="brand_id" value="38">
                <div class="bot"><a id="submitBtn" class="ncap-btn-big ncap-btn-green" href="JavaScript:void(0);">确认提交</a></div>
            </div>
        </form>
    </div>
    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>
<script>

    $("#submitBtn").click(function() {
        var rank_name = $('#rank_name').val();
        if (rank_name == '') {
            layer.msg('请填写层级名称!', {icon:2, time:1000});
            return false;
        }
        $("#rank_form").submit();
    });
</script>
<include file="common:__foot__"/>
